<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%sys_balance}}".
 *
 * @property integer $id
 * @property integer $uid
 * @property double $account_ye
 * @property double $account_bzj
 * @property double $account_djbzj
 * @property string $password
 * @property integer $created_at
 * @property integer $status
 */
class Balance extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%sys_balance}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid'], 'required'],
            [['uid', 'created_at', 'status'], 'integer'],
            [['account_ye', 'account_bzj', 'account_djbzj'], 'number'],
            [['password'], 'string', 'max' => 120]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => '用户ID',
            'account_ye' => '余额',
            'account_bzj' => '可用保证金',
            'account_djbzj' => '冻结保证金',
            'password' => '支付密码',
            'created_at' => '更新时间',
            'status' => '1正常 2冻结',
        ];
    }
}
